import http from "@/api/axios";

export const getListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/lookup/page",
    data
  });
};
export const addLookupApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/lookup",
    data
  });
};
export const editLookupApi = (data: Base.GeneraDataType) => {
  return http({
    method: "put",
    url: "/base/biz/lookup",
    data
  });
};
export const enabledLookupApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/lookup/enabled",
    data
  });
};
export const disabledLookupApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/lookup/disabled",
    data
  });
};
export const getAllLookupApi = (data: Base.GeneraDataType = {}) => {
  return http({
    method: "post",
    url: "/base/biz/lookup/all",
    data
  });
};
// 获取数据字段键值对列表
export const getLookupItemByCodeApi = (data: { parentCode: string }) => {
  return http({
    method: "post",
    url: "/base/biz/lookup-item/list",
    data
  });
};
// 数据字典删除
export const deleteLookupApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/lookup",
    data
  });
};
